package com.hainatong.shiphelper.module.warehouse.adapter;

import com.hainatong.shiphelper.databinding.ItemSupplierInfoViewBinding;
import com.hainatong.shiphelper.module.warehouse.entity.SupplierBean;
import org.jetbrains.annotations.NotNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.shiphelper.R;

public class SupplierAdapter extends BaseQuickAdapter<SupplierBean, BaseDataBindingHolder<ItemSupplierInfoViewBinding>>
{
    public SupplierAdapter()
    {
        super(R.layout.item_supplier_info_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemSupplierInfoViewBinding> bindingHolder, SupplierBean supBean)
    {
        ItemSupplierInfoViewBinding binding = bindingHolder.getDataBinding();
        if( binding != null )
        {
            binding.setSupplier( supBean );
            binding.executePendingBindings();
        }
    }
}
